﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using AssetManageSystem.Model.AssetManage;
using AssetManageSystem.Model.OrgManage;


namespace AssetManageSystem.ViewModel.AssetManage.AssetRepairVMs
{
    public partial class AssetRepairSearcher : BaseSearcher
    {
        public List<ComboSelectListItem> AllRepairmans { get; set; }
        [Display(Name = "报修人")]
        public Guid? RepairmanId { get; set; }
        public List<ComboSelectListItem> AllRepairDeps { get; set; }
        [Display(Name = "报修部门")]
        public Guid? RepairDepId { get; set; }
        [Display(Name = "报修日期")]
        public DateRange OutDate { get; set; }
        [Display(Name = "维修单位")]
        public String RepairUnit { get; set; }

        public Guid? RepairAssetId { get; set; }

        protected override void InitVM()
        {
            AllRepairmans = DC.Set<User>().GetSelectListItems(Wtm, y => y.UserName);
            AllRepairDeps = DC.Set<Department>().GetSelectListItems(Wtm, y => y.DepName);
        }

    }
}
